<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>渐变</title>
  <style>
    .box {
        width: 200px;
        height: 200px;
        margin: 50px auto;
        /* 线性渐变 */
        /*background-image: linear-gradient(green, yellow, red);*/
        /*background-image: linear-gradient(to left top, green, yellow, red);*/
        /*background-image: linear-gradient(45deg, green, yellow, red);*/
        /*background-image: linear-gradient(to right, rgba(255,0,0,0), rgba(255,0,0,1));*/
        /*background-image: repeating-linear-gradient(green, yellow 10%, red 20%);*/
        /*background-image: repeating-linear-gradient(red, yellow 10%, green 20%);*/

        /* 径向渐变 */
        /*background-image: radial-gradient(circle, red, yellow, green);*/
        /*background-image: radial-gradient(red 5%, yellow 15%, green 60%);*/
        /*background-image: radial-gradient(red 30px, yellow 100px, green 150px);*/
        /*background-image: radial-gradient(closest-side circle at 30% 30%, red, yellow, green);*/
        /*background-image: radial-gradient(farthest-side circle at 30% 30%, red, yellow, green);*/
        /*background-image: radial-gradient(closest-corner circle at 30% 30%, red, yellow, green);*/
        /*background-image: radial-gradient(farthest-corner circle at 30% 30%, red, yellow, green);*/

        background-image: repeating-radial-gradient(red, yellow 10%, green 15%);
        transform: translate();
    }
  </style>
</head>
<body>
<div class="box"></div>
</body>
</html>
